Limit the amount of text we examine when looking for password prompts
authorJim Porter <jporterbugs@gmail.com>
Sat, 15 Jun 2024 18:03:33 +0000 (11:03 -0700)
committerJim Porter <jporterbugs@gmail.com>
Fri, 21 Jun 2024 00:37:19 +0000 (17:37 -0700)
commit1a55e957ae57ec32ae960eabdb170b5b427392d4
tree4de7e9df6e55c76bd69df1d94d5f3ec5ea6513e4
parent72f2b01e318054e2e040f7de676e9c4919533161
Limit the amount of text we examine when looking for password prompts

Both Comint and Eshell do this, and it can significantly slow down
commands that write a lot of output (bug#71576).

* lisp/comint.el (comint-password-prompt-max-length): New variable...
(comint-watch-for-password-prompt): ... use it.  Additionally, use the
matched result for the Emacs-based password prompt.

* lisp/eshell/esh-mode.el (eshell-password-prompt-max-length): New
variable...
(eshell-watch-for-password-prompt): ... use it.

* etc/NEWS: Announce this change.
etc/NEWS
lisp/comint.el
lisp/eshell/esh-mode.el